import BaseService from '../BaseService'
import factory from '../serviceFactory'
class PersonalService extends BaseService {
  /**
   * queryVacationPage(page,pageSize,{sidx,sord,beginTime,beginTime,param})
   */
  queryVacationPage = factory.makeQuery('personal', 'LeaveInfo')

  /**
   * queryOvertimePage(page,pageSize,{sidx,sord,beginTime,beginTime,param})
   */
  queryOvertimePage = factory.makeQuery('personal', 'Overtime')

  getPersonalInfoSilence = factory.makeGet('/api/personal/getPersonalInfo', {failedW: false, canCancel: false})

  getPersonalInfo = factory.makeGet('/api/personal/getPersonalInfo')

  updatePersonalInfo = factory.makeUpdate('personal', 'PersonalInfo')

  updateUserInfo = factory.makeUpdate('personal', 'UserInfo')

  /**
   * queryEgressionPage(page,pageSize,{sidx,sord,beginTime,beginTime,param})
   */
  queryEgressionPage = factory.makeQuery('personal', 'EgressionInfo')

  /**
   * queryAttendancePage(page,pageSize,{sidx,sord,beginTime,beginTime,param})
   */
  queryAttendancePage = factory.makeQuery('personal', 'Attendance')

  /**
   * queryWorkOffPage(page,pageSize,{sidx,sord,beginTime,beginTime,param})
   */
  queryWorkOffPage = factory.makeQuery('personal', 'WorkOff')

  /**
   * queryMyHours()
   */
  queryMyHours = factory.makeGet('/api/personal/queryMyHours')
  /**
   * queryContacts()
   */
  queryContacts = factory.makeQuery('user', 'Contacts')

  /**
   * queryBusinessTripPage(page,pageSize,{sidx,sord,beginTime,beginTime,param})
   */
  queryBusinessTripPage = factory.makeQuery('personal', 'BusinessTrip')

  /**
   * queryOtherApplyPage(page,pageSize,{sidx,sord,beginTime,beginTime,param})
   */
  queryOtherApplyPage = factory.makeQuery('personal', 'OtherApply')

  returnResource = factory.makePost('/api/personal/returnResource')

  /**
   * queryVacationTimePage(page,pageSize,{sidx,sord,beginTime,beginTime,param})
   */
  queryVacationTimePage = factory.makeQuery('personal', 'VacationTime')

  /**
   * queryVacationTimePage(page,pageSize,{sidx,sord,beginTime,beginTime,param})
   */
  queryAnnualVacationPage = factory.makeQuery('personal', 'AnnualVacation')

  queryLeftVacation = factory.makeGet('/api/personal/queryLeftVacation')

  /**
   * 查询我的绩效考核
   * queryPerformanceAppraisalPage(page,pageSize,{sidx,sord,beginTime,beginTime,param})
   */
  queryPerformanceAppraisalPage = factory.makeQuery('personal', 'PerformanceAppraisal')

  /**
   * 查询绩效考核详情
   * detailPerformanceAppraisal({id})
   */
  detailPerformanceAppraisal = factory.makeDetail('personal', 'PerformanceAppraisal')
}
export default new PersonalService()
